package com.wyh.mapper;

import org.apache.ibatis.annotations.*;

@Mapper
public interface captchaMapper {

    @Insert("insert into captcha VALUES (#{email}, #{code})")
    void insertCaptchaByEmail(@Param("email") String email, @Param("code") String code);

    @Delete("DELETE FROM captcha WHERE email=#{email}")
    void deleteCaptcha(String email);

    @Select("select captcha from captcha where email=#{email}")
    int findCaptchaByEmail(String email);
}

/*
* 多个参数传入 要 @parem（）注释
* */